<!DOCTYPE html>
<html>
<head>
	<title><?php echo $CFG["title"]; ?></title>
	
	<link rel="stylesheet" type="text/css" href="/css/style.css" />
	
	<script type="text/javascript" src="/js/jquery/jquery-1.5.1.min.js"></script>
	<script type="text/javascript" src="/js/jquery/jquery-ui-1.8.9.custom.min.js"></script>
	<script type="text/javascript" src="/js/application.js"></script>
	<script type="text/javascript" src="/js/menu.js"></script>
</head>
<body>
	<?php if(!empty($_SESSION["flash"])): ?>
	<div id="flash-message" class="shadow <?php echo $_SESSION["flash"]["status"]; ?>">
		<div class="content"><?php echo $_SESSION["flash"]["message"]; ?></div>
	</div>
	<script type="text/javascript">
		setTimeout(function(){
			$("#flash-message").slideUp();
		}, <?php echo $CFG["flash_timeout"]*1000; ?>)
	</script>
	<?php unset($_SESSION["flash"]); ?>
	<?php endif; ?>
	
	<?php if($user=Authentication::getUser()): ?>
	<?php echo $this->parseElement("menu"); ?>
	<div class="throbber shadow">Loading...</div>
	<div id="main-content">
	</div>
	<?php else: ?>
		<?php echo $this->parseElement("login_form"); ?>
	<?php endif; ?>
</body>
</html>